
<?php if (validation_errors()) : ?>
<div class="notification error">
	<?php echo validation_errors(); ?>
</div>
<?php endif; ?>
<?php // Change the css classes to suit your needs    
if( isset($achievements) ) {
	$achievements = (array)$achievements;
}
$id = isset($achievements['id']) ? "/".$achievements['id'] : '';
?>
<?php echo form_open($this->uri->uri_string(), 'class="constrained ajax-form"'); ?>
<?php if(isset($achievements['id'])): ?><input id="id" type="hidden" name="id" value="<?php echo $achievements['id'];?>"  /><?php endif;?>
<div>
        <?php echo form_label('Title', 'achievements_title'); ?> <span class="required">*</span>
        <input id="achievements_title" type="text" name="achievements_title" maxlength="255" value="<?php echo set_value('achievements_title', isset($achievements['achievements_title']) ? $achievements['achievements_title'] : ''); ?>"  />
</div>

<div>
        <?php echo form_label('Description', 'achievements_desc'); ?>
	<?php echo form_textarea( array( 'name' => 'achievements_desc', 'id' => 'achievements_desc', 'rows' => '5', 'cols' => '80', 'value' => set_value('achievements_desc', isset($achievements['achievements_desc']) ? $achievements['achievements_desc'] : '') ) )?>
</div>
<div>
        <?php echo form_label('Points', 'achievements_points'); ?> <span class="required">*</span>
        <input id="achievements_points" type="text" name="achievements_points" maxlength="5" value="<?php echo set_value('achievements_points', isset($achievements['achievements_points']) ? $achievements['achievements_points'] : ''); ?>"  />
</div>



	<div class="text-right">
		<br/>
		<input type="submit" name="submit" value="Edit Achievements" /> or <?php echo anchor(SITE_AREA .'/content/achievements', lang('achievements_cancel')); ?>
	</div>
	<?php echo form_close(); ?>

	<div class="box delete rounded">
		<a class="button" id="delete-me" href="<?php echo site_url(SITE_AREA .'/content/achievements/delete/'. $id); ?>" onclick="return confirm('<?php echo lang('achievements_delete_confirm'); ?>')"><?php echo lang('achievements_delete_record'); ?></a>
		
		<h3><?php echo lang('achievements_delete_record'); ?></h3>
		
		<p><?php echo lang('achievements_edit_text'); ?></p>
	</div>
